﻿using Prism.Mvvm;
using Prism.Services.Dialogs;
using System;

namespace CCSSolderUI.ViewModels.Dialogs
{
    public class AboutDialogViewModel : BindableBase, IDialogAware
    {
        public string Title => "关于";
        private string name;
        public string Name
        {
            get { return name; }
            set { SetProperty(ref name, value); }
        }
        private string version;
        public string Version
        {
            get { return version; }
            set { SetProperty(ref version, value); }
        }

        public event Action<IDialogResult> RequestClose;

        public bool CanCloseDialog()
        {
            return true;
        }

        public void OnDialogClosed()
        {
            
        }

        public void OnDialogOpened(IDialogParameters parameters)
        {
            Name = parameters.GetValue<string>("Title");
            Version = parameters.GetValue<string>("Version");
        }
    }
}
